import selectionManager from '@ohos.selectionInput.selectionManager';

export class SelectionModel {
  private message: string;
  private selectionPanel: selectionManager.Panel | undefined;

  private constructor() {
    this.message = "Hello World";
    this.selectionPanel = undefined;
  }

  public static getInstance(): SelectionModel {
    if (globalThis.instance == null) {
      globalThis.instance = new SelectionModel();
    }
    return globalThis.instance;
  }

  public getMessage(): string {
    return this.message;
  }

  public setMessage(message: string) {
    this.message = message;
  }

  public getSelectionPanel(): selectionManager.Panel | undefined {
    return this.selectionPanel;
  }

  public setSelectionPanel(selectionPanel: selectionManager.Panel) {
    this.selectionPanel = selectionPanel;
  }}